package com.meilingcloud.biobank.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 转移样本 对象 bank_shift_sample
 *
 * @author chenl
 * @date 2021-04-30
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("bank_shift_sample")
public class ShiftSample implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 转移样本ID
     */
    @TableId(value = "shift_sample_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long shiftSampleId;

    /**
     * 转移单据ID
     */
    private String shiftId;

    /**
     * 样本复份ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampBackupId;

    /**
     * 样本复份编号
     */
    private String sampBackupCode;

    /**
     * 样本源ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampSourceId;

    /**
     * 样本源名称
     */
    private String sampSourceName;

    /**
     * 样本源类型ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampSourceTypeId;

    /**
     * 样本源类型名称
     */
    private String sampSourceTypeName;

    /**
     * 样本类型ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampTypeId;

    /**
     * 样本类型名称
     */
    private String sampTypeName;

    /**
     * 转移前冻存管ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long oldTubeId;

    /**
     * 转移后冻存管ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long newTubeId;

    /**
     * 转移前容器ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long oldContainerId;

    /**
     * 转移后容器ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long newContainerId;

    /**
     * 转移前格式化位置
     */
    private String oldSampLocation;

    /**
     * 转移后格式化位置
     */
    private String newSampLocation;

    /**
     * 删除标志
     */
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
